
project(Media LANGUAGES CXX)







find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets)


find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets)


set(INC_LIST 
	 "include/media_global.h"
 
	  "include/decoderbase.h")

message(STATUS "[${PROJECT_NAME}-INC_LIST:] ${INC_LIST}")

set(SRC_LIST 
	
 
 
 )


message(STATUS "[${PROJECT_NAME}-SRC_LIST:] ${SRC_LIST}")

set(RES_LIST 
	
	 "src/decoderbase.cpp")

message(STATUS "[${PROJECT_NAME}-RES_LIST:] ${RES_LIST}")

add_library(${PROJECT_NAME} SHARED ${INC_LIST}  ${SRC_LIST} ${RES_LIST})

target_link_libraries(${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets)

target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)



# 链接ffmepg 库


target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/ffmpeg/include)


target_link_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/ffmpeg/lib)


target_link_libraries(${PROJECT_NAME} PRIVATE "avformat")




#输出文件路径
include(OutPutDirConfig)

#编译库输出宏
target_compile_definitions(${PROJECT_NAME} PRIVATE MEDIA_LIBRARY)